<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <script type="text/javascript" src="./script/rem.js"></script>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <script type="text/javascript" src="./script/aui-slide.js"></script>
    <script type="text/javascript" src="./script/jquery.min.js"></script>
    <script type="text/javascript" src="./script/doT.min.js"></script>
    <script type="text/javascript" src="./script/base.js"></script>
    <script type="text/javascript" src="./script/api.js"></script></head>
    <script type="text/javascript" src="./script/aui-tab.js" ></script>
    <script type="text/javascript" src="./script/jquery-3.2.0.js"></script>
</head>
<body>

    <header class="head" style="padding-top:0.4rem;">
        <div class="head-l" tapmode onclick="closeWin()"><i class="fa fa-angle-left"></i></div>
        <h3>通知设置</h3>
        <div class="head-r"></div>
    </header>
    <div class="head-d" style="padding-top:0.4rem;"></div>

    <ul class="list-input mb20">

        <li>
            <label>通知提醒:</label>
            <input type="text" id="name">
            <div class="list-input-r">
                <div id="notice" class="list-input-switch" onclick="setupNotice()"></div>
            </div>
        </li>

    </ul>

</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript" src="./script/index.js"></script>
<script type="text/javascript">

    apiready = function(){
      var notice = $api.getStorage('notice');
      if (notice) {
        $('#notice').addClass('active');
    }else{
        $('#notice').removeClass('active');
    }
}

    // 通知设置
    function setupNotice(){
      var notice = $api.getStorage('notice');
      if (notice) {
        $api.setStorage('notice', null);
        // $('#notice').removeClass('active');
    }else{
        // $('#notice').addClass('active');
        $api.setStorage('notice', 1);
    }
}

function closeWin(){
    api.closeWin({
    });
}
$(".list-input-switch").on('click',function(){
    $(".list-input-switch").toggleClass("active");

})
</script>
</html>
